package cn.legend.travel.tour.team.schedule;

import cn.legend.travel.tour.team.service.ITourService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class TourSearchSchedule {
    @Autowired
    private ITourService tourService;
    @Scheduled(cron = "0 30 2 * * ?") // 每日凌晨2:30执行
    public void rebuildSearch() {
        log.debug("开始执行【重新创建旅游团的搜索数据】的计划任务");
        tourService.rebuildSearch();
    }
}
